<!doctype html>
<html>
<?php echo $this->fetch('head.html'); ?>

<body>
  <div class="fullscreen">
  <div class="scroll_content">
    <div class="topfixed">
      <div class="t_left"><a href="index.php"><i class="back"></i></a></div>
      <div class="t_main">优惠券</div>
      
    </div>
    <div class="paddingheight"></div>
    
    <div class="street_list_wrap">
      <ul class="list">
        <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?> 
        <li>
          <p><a href="<?php if ($this->_var['c']['type_id'] == 4): ?>/index.php?m=shop&shopid=<?php echo $this->_var['c']['shopid']; ?><?php elseif ($this->_var['c']['type_id'] == 2): ?>/index.php?m=ymdian<?php elseif ($this->_var['c']['type_id'] == 3): ?>/index.php?m=koudai<?php else: ?>/index.php?m=shoplist<?php endif; ?>"><img src="<?php echo images_site($this->_var['c']['imgurl']); ?>" class="img"></a></p>
          <p class="tit"><?php echo $this->_var['c']['title']; ?></p>
          <p class="tit"><span class="fl"><?php if ($this->_var['c']['type_id'] != 4): ?><?php echo $this->_var['type_list'][$this->_var['c']['type_id']]; ?><?php else: ?><?php echo $this->_var['c']['shopname']; ?><?php endif; ?></span><span class="fr getyhq pointer" did="<?php echo $this->_var['c']['id']; ?>">领取</span></p>
        </li>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> 
      </ul>
     <div class="clearfix"></div>
      <?php echo $this->_var['pagelist']; ?>
    </div>
    
  </div>
</div>
<script>
  
$(function(){
	$(".street_list_wrap .list li:odd").css("margin-left","2%");
	$(document).on("click",".getyhq",function(){
		$.get("/index.php?m=coupon&a=get&ajax=1&id="+$(this).attr("did"),function(data){
			skyToast(data.message);
		},"json");
	});
});

  </script>
 <?php echo $this->fetch('botnav.html'); ?>
 <?php echo $this->fetch('footer.html'); ?> 
</body>
</html>
